#pragma once
#include <clUtil.h>
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <getopt.h>
#include <string.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>

void init(int argc, char** argv);

enum StorageMechanism
{
  kStorageMechanismImage,
  kStorageMechanismGlobalMemory,
  kStorageMechanismLocalMemory
};

struct AlgorithmConfig
{
  StorageMechanism SpectrumStorage;
  size_t LocalWorkSize;
};

extern unsigned int gNumClasses;
extern unsigned int gPrecursorTolerance;
extern unsigned int gPeakTolerance;
extern float gTICCutoff;
extern bool gPPMTolerance;
extern unsigned int gBestScoreListSize;
extern unsigned int gMaxPrecursorCharge;
extern unsigned int gMaxMissedCleavages;
extern unsigned int gMinTerminiCleavages;
extern unsigned int gMaxPeakCount;
extern char* gConfigFile;
extern char* gWorkDir;
extern int gCPUS;
extern char* gProteinDatabase;
extern std::vector<char*> gMSMSDataFiles;
extern unsigned int gBufferSize;

extern const char* gVersion;

//Autotuning variables
extern std::vector<AlgorithmConfig> gDeviceAlgorithmConfig;
